package god;

import java.util.Scanner;

public class J10Account {
	public static void main(String[] agrs) {
		
		int aid = 0;
		int deposit = 0;
		int withdraw = 0;
		int balance = 0;
		double interestRate = 0;
		double monthlyInterestRate = 0;
		String dateCreated = "";
		
		aid = getAid( makeScanner() );
		dateCreated = getDateCreated( makeScanner() );
		interestRate = getInterestRate( makeScanner() );
		balance = getBalance( makeScanner() );
		deposit = getDeposit( makeScanner() );
		withdraw = getWithdraw( makeScanner() );		
		monthlyInterestRate = getMonthlyinterestRate(interestRate);
		deposit = Deposit(balance, deposit);
		withdraw = WithDraw(balance, withdraw);
		
		System.out.println(aid);
		System.out.println(interestRate);
		System.out.println(monthlyInterestRate);
		System.out.println(dateCreated);
		System.out.println(balance);
		System.out.println(withdraw);
		System.out.println(deposit);
	}
	
	public static Scanner makeScanner() {
		Scanner sc = new Scanner(System.in);
		return sc;
	}
	
	public static void closeScanner(Scanner sc) {
		sc.close();
	}
	
	public static int getAid(Scanner sc) {
		int aid;
		System.out.println("계좌번호를 입력해주세요.");
		aid = sc.nextInt();
		return aid;
	}
	
	public static String getDateCreated(Scanner sc) {
		String dateCreated;
		System.out.println("통장 개설일을 입력해주세요.");
		dateCreated = sc.next();
		return dateCreated;
	}
	
	public static double getInterestRate(Scanner sc) {
		double interestRate;
		System.out.println("연간 이자율을 입력해주세요.");
		interestRate = sc.nextInt();
		return interestRate;
	}
	
	public static int getBalance(Scanner sc) {
		int balance;
		System.out.println("잔액을 입력해주세요.");
		balance = sc.nextInt();
		return balance;
	}
	
	public static int getDeposit(Scanner sc) {
		int deposit;
		System.out.println("입금액을 입력해주세요.");
		deposit = sc.nextInt();
		return deposit;
	}
	
	public static int getWithdraw(Scanner sc) {
		int withdraw;
		System.out.println("출금액을 입력해주세요.");
		withdraw = sc.nextInt();
		return withdraw;
	}
	
	public static double getMonthlyinterestRate (double interestRate) {
		return interestRate / 12;
	}
	
	public static int WithDraw(int balance, int withdraw) {
		return balance - withdraw;
	}
	
	public static int Deposit(int balance, int deposit) {
		return balance + deposit;
	}

}
